package itsm.isperp.framework.quartz.executor;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 */
public class SpringBeanJobExecutor implements Job{
	public void execute(JobExecutionContext context) throws JobExecutionException {
		SpringBeanJobExecutorDetail jobDetail=(SpringBeanJobExecutorDetail)context.getJobDetail();
		Job job=(Job)jobDetail.getApplicationContext().getBean(jobDetail.getTargetJobBeanId());
		job.execute(context);
	}
}
